package PokerTPTest;

import static org.junit.Assert.*;

import org.junit.Test;

import PokerTP.Blad;
import PokerTP.Deck;
import PokerTP.Player;

public class PlayerTest {
	private Player player;
	
	@Test(expected=NullPointerException.class)
	public void test1() { // proba gry "bez reki"
		player = new Player();
		player.wykonajSwojRuch();
	}
	
	@Test
	public void test2() { // przekazanie pustej talii
		try
		{
			player = new Player(null);
			fail("Klasa kontynuuje dzialanie mimo nieprawidlowych danych.");
		}
		catch(NullPointerException e)
		{}
	}
	
	@Test(expected=Blad.class)
	public void test3() throws Blad { // proba zmiany nieistniejacej 6 karty
		player = new Player(new Deck());
		player.zmien(6);
	}

}
